"""school_web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.conf.urls import include
import admincms.views as admin_views
import index.views as index_view
import content.views as content_view
from django.conf.urls import url
from django.views.static import serve
from django.conf import settings


urlpatterns = [
    path('admin/', admin.site.urls),
    path('tinymce/', include('tinymce.urls')),
    path('upload_image/', admin_views.upload_image),
    path('', index_view.page_index),
    path('index/', index_view.page_index),
    path('list/<menu_type>', content_view.page_list),
    path('detail/<menu_type>/<article_id>', content_view.page_detail),
    path('search_list/', index_view.search_list),
    path('search_detail/<article_id>', content_view.search_detail),
    path('feedback/<menu_type>', content_view.feedback),
    path('submit_feedback/<menu_type>', content_view.submit_feedback),
    path('questionnaire/detail/<article_id>', content_view.questionnaire_detail),
    path('submit_questionnaire/<article_id>', content_view.submit_questionnaire),
    url(r'^static/(?P<path>.*)$', serve,  {'document_root': settings.STATIC_ROOT, }),
]
